/**
 * 
 */
package com.pcbly.web.persistence.chart;

import java.util.List;

import com.pcbly.web.bean.chart.ChartPropertyBean;
import com.pcbly.web.persistence.HibernateBaseDao;

/**
 * @author carl.song
 *
 */
public class ChartPropertyHibernateDao extends
		HibernateBaseDao<ChartPropertyBean> implements ChartPropertyDao {

	/**
	 * 
	 */
	private static final long serialVersionUID = 2413953596673038649L;
	public ChartPropertyHibernateDao(){
		super();
	}
	protected Class<ChartPropertyBean> getEntityClass(){
		return ChartPropertyBean.class;
	}
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}
	public int deleteChartPropertyBeanById(String id)throws Exception{
			super.removeById(entityClass, id);
		return 1;
	}
	public int updateChartPropertyBean(ChartPropertyBean bean)throws Exception{
		getHibernateTemplate().update(bean);
		return 1;
	}
	public int insertChartPropertyBean(ChartPropertyBean bean)throws Exception{
		getHibernateTemplate().save(bean);
		return 1;
	}
	public ChartPropertyBean queryDetailChartPropertyBeanById(String id)throws Exception{
		ChartPropertyBean bean=super.get(entityClass, id);
		return bean;
	}
	public ChartPropertyBean queryChartPropertyBeanById(String id)throws Exception{
		return super.get(entityClass, id);
	}
	@Override
	public List<ChartPropertyBean> queryList() throws Exception {
		// TODO Auto-generated method stub
		return super.getAll(entityClass);
	}
}
